/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Model;

import java.util.List;
import pojo.Categories;

/**
 *
 * @author CANHNGUYEN
 */
public interface CategoryInterface {

    /*
     * List All Category
     */
    public List listAllCategory();

    
    /*
     * List Category from startId
     */
    public List listCategoryById(int startId, int endId);
    
/*
 * List Category by name
 */
    public List listCategoryByName(String categoryName);

    /*
     * List Category by name Expression
     * Parameter:
     * \t nameExpression : expression of name
     * Example: name = "[a-zA-Z0-9]*"
     */
    public List listCategoryByNameExpression(String nameExpression);
    
    /*
     * insert a Category into Database
     * parameter 
     * \t category : Categories Object
     */
    public boolean addCategory(Categories category);

    /*
     * insert a Category into Database
     * parameter :
     * \t categoryId : Id Of category
     * \t categoryName : name of category
     */
    public boolean addCategory(int categoryId, String categoryName);
    
    /*
     * Delete category by category Id
     */
    public boolean deleteCategory(int categoryId);

    /*
     * Instead of original Category object by new category object
     */
    public boolean editCategory(Categories originalCategory, Categories newCategory);

    /*
     * Instead of original Category object by new category object via category id
     */
    public boolean editCategory(int originalCategoryId, Categories newCategory);
}
